waste_dict = {
    "David Tao":["《天天》","《找自己》","","《不爱》","《似曾相识》","《爱很简单》","《流沙》"],
    "Jay zhou":["《晴天》","《你好吗》","《天涯过客》","《枫》","《爱在西元前》","《最长的电影》"],
    "joker xue":["《变废为宝》","《那是你离开了北京的生活》","《绅士》","《天外来物》"],
    "JJ lin":["《她说》","《讲故事写成我们》","《可惜没如果》","《不为谁而作的歌》"],
    }
while True:
    search_waste = input("请输入您要查询的歌曲：")
    find = False
    if search_waste == "q":
        break
    for classify,waste in waste_dict.items():
        if search_waste in waste:
            find = True
            print(f"{search_waste}的歌手是{classify}")
            print("-"*30)
    if find == False:
        print("曲库未更新，自己去别的地方找吧")
        print("-"*30)
        for classify,waste in waste_dict.items():
            print(f"{classify}包括：",end="")
            for item in waste:
                if waste.index(item) == len(waste) - 1:
                    print(item)
                else:
                    print(item,end="，")
        print("-" * 30)
        break
    while True:
            option = input("您是否希望将此歌曲加入到喜欢中呢(yes/no)？")
            if option == "yes":
                classify = input("您希望将歌曲加入到哪个类别？")
                try:
                    waste_dict[classify].append(search_waste)
                except KeyError:
                    print("您的输入有误，没有此类别")
                break
            elif option == "no":
                print("可以继续查询歌曲")
                break
            else:
                print("您的输入有误，请重新输入")
